package com.a.basis.Sort;

import java.util.Arrays;
            //  JDK排序
public class TestJDKSort {
    public static void main(String[] args) {
        int[] nums={4,3,5,2,1};
        Arrays.sort(nums);      //只能做升序
        //元素的倒置

        printArray(nums);
    }
    public static void printArray(int[] nums){
        for (int i = 0; i < nums.length; i++) {
            System.out.print(nums[i]+"\t");
        }
        System.out.println();
    }
}
